#include "city_search_dialog.h"
#include "ui_city_search_dialog.h"


QStringList city_search_Dialog::getComboBoxValue()
{
    QStringList ret;
    ret.append(ui->comboBox_country->currentText());
    ret.append(ui->comboBox_city->currentText());
    return ret;
}

city_search_Dialog::city_search_Dialog(QSet<QString> &City_name, QSet<QString> &Country_name, QWidget *parent):
    QDialog(parent),
    ui(new Ui::city_search_Dialog),
    city_name(City_name),
    country_name(Country_name)

{
   ui->setupUi(this);
   for(auto e : city_name)
   {
       ui->comboBox_city->addItem(e);
   }
   for(auto e : country_name)
   {
       ui->comboBox_country->addItem(e);
   }
}

city_search_Dialog::~city_search_Dialog()
{
    delete ui;
}

void city_search_Dialog::on_pushButton_2_clicked()
{
    this->close();
}

void city_search_Dialog::on_pushButton_clicked()
{
    this->accept();
    this->close();
}
